package com.eaoa.vo.pub.base;

import java.io.Serializable;

import com.eaoa.vo.pub.PubAttachment;


/**
 * This is an object that contains data related to the PUB_ATTACHMENT table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="PUB_ATTACHMENT"
 */

public abstract class BasePubAttachment  implements Serializable {

	public static String REF = "PubAttachment";
	public static String PROP_ATTACHMENTNAME = "attachmentname";
	public static String PROP_CREATEBYNAME = "createbyname";
	public static String PROP_ATTACHMENTTYPE = "attachmenttype";
	public static String PROP_ISLOCK = "islock";
	public static String PROP_REMARK = "remark";
	public static String PROP_EXTENDNAME = "extendname";
	public static String PROP_ATTACHMENTNO = "attachmentno";
	public static String PROP_CREATEDATE = "createdate";
	public static String PROP_ORIGINALNAME = "originalname";
	public static String PROP_RELATEDNO = "relatedno";


	// constructors
	public BasePubAttachment () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BasePubAttachment (java.lang.Long attachmentno) {
		this.setAttachmentno(attachmentno);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long attachmentno;

	// fields
	private java.lang.String attachmentname;
	private java.lang.String extendname;
	private java.lang.String originalname;
	private java.lang.String attachmenttype;
	private java.lang.String createbyname;
	private java.util.Date createdate;
	private java.lang.Long relatedno;
	private java.lang.String remark;
	private java.lang.String islock;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="sequence"
     *  column="ATTACHMENTNO"
     */
	public java.lang.Long getAttachmentno () {
		return attachmentno;
	}

	/**
	 * Set the unique identifier of this class
	 * @param attachmentno the new ID
	 */
	public void setAttachmentno (java.lang.Long attachmentno) {
		this.attachmentno = attachmentno;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: ATTACHMENTNAME
	 */
	public java.lang.String getAttachmentname () {
		return attachmentname;
	}

	/**
	 * Set the value related to the column: ATTACHMENTNAME
	 * @param attachmentname the ATTACHMENTNAME value
	 */
	public void setAttachmentname (java.lang.String attachmentname) {
		this.attachmentname = attachmentname;
	}



	/**
	 * Return the value associated with the column: EXTENDNAME
	 */
	public java.lang.String getExtendname () {
		return extendname;
	}

	/**
	 * Set the value related to the column: EXTENDNAME
	 * @param extendname the EXTENDNAME value
	 */
	public void setExtendname (java.lang.String extendname) {
		this.extendname = extendname;
	}



	/**
	 * Return the value associated with the column: ORIGINALNAME
	 */
	public java.lang.String getOriginalname () {
		return originalname;
	}

	/**
	 * Set the value related to the column: ORIGINALNAME
	 * @param originalname the ORIGINALNAME value
	 */
	public void setOriginalname (java.lang.String originalname) {
		this.originalname = originalname;
	}



	/**
	 * Return the value associated with the column: ATTACHMENTTYPE
	 */
	public java.lang.String getAttachmenttype () {
		return attachmenttype;
	}

	/**
	 * Set the value related to the column: ATTACHMENTTYPE
	 * @param attachmenttype the ATTACHMENTTYPE value
	 */
	public void setAttachmenttype (java.lang.String attachmenttype) {
		this.attachmenttype = attachmenttype;
	}



	/**
	 * Return the value associated with the column: CREATEBYNAME
	 */
	public java.lang.String getCreatebyname () {
		return createbyname;
	}

	/**
	 * Set the value related to the column: CREATEBYNAME
	 * @param createbyname the CREATEBYNAME value
	 */
	public void setCreatebyname (java.lang.String createbyname) {
		this.createbyname = createbyname;
	}



	/**
	 * Return the value associated with the column: CREATEDATE
	 */
	public java.util.Date getCreatedate () {
		return createdate;
	}

	/**
	 * Set the value related to the column: CREATEDATE
	 * @param createdate the CREATEDATE value
	 */
	public void setCreatedate (java.util.Date createdate) {
		this.createdate = createdate;
	}



	/**
	 * Return the value associated with the column: RELATEDNO
	 */
	public java.lang.Long getRelatedno () {
		return relatedno;
	}

	/**
	 * Set the value related to the column: RELATEDNO
	 * @param relatedno the RELATEDNO value
	 */
	public void setRelatedno (java.lang.Long relatedno) {
		this.relatedno = relatedno;
	}



	/**
	 * Return the value associated with the column: REMARK
	 */
	public java.lang.String getRemark () {
		return remark;
	}

	/**
	 * Set the value related to the column: REMARK
	 * @param remark the REMARK value
	 */
	public void setRemark (java.lang.String remark) {
		this.remark = remark;
	}



	/**
	 * Return the value associated with the column: ISLOCK
	 */
	public java.lang.String getIslock () {
		return islock;
	}

	/**
	 * Set the value related to the column: ISLOCK
	 * @param islock the ISLOCK value
	 */
	public void setIslock (java.lang.String islock) {
		this.islock = islock;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof PubAttachment)) return false;
		else {
			PubAttachment pubAttachment = (PubAttachment) obj;
			if (null == this.getAttachmentno() || null == pubAttachment.getAttachmentno()) return false;
			else return (this.getAttachmentno().equals(pubAttachment.getAttachmentno()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getAttachmentno()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getAttachmentno().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}